#ifndef SWIG_SHARED_PTR_TYPEMAPS
#define SWIG_SHARED_PTR_TYPEMAPS(CONST, TYPE...) SWIG_SHARED_PTR_TYPEMAPS_IMPLEMENTATION(public, public, CONST, TYPE)
#endif
#pragma SWIG nowarn=302,516

%include "typemaps.i"
%include "std_string.i"
%include "std_shared_ptr.i"
%include "std_vector.i"
%include "std_array.i"
%include "std_pair.i"
%module GlobalTypemaps

#ifndef __WIN32__
typedef long int int64_t;
typedef unsigned long long int	uint64_t;

%extend std::vector<int64_t> {
%proxycode %{
    public StdVectorLong(long[] initialElements) {
        this();
        for (long element : initialElements) {
            add((int) element);
        }
    }

    public Long get_(int index) {
        return (long) doGet(index);
    }

    public Integer set(int index, Long e) {
        return doSet(index, e.intValue());
    }

    public boolean add(Long e) {
        modCount++;
        doAdd(e.intValue());
        return true;
    }

    public void add(int index, Long e) {
        modCount++;
        doAdd(index, e.intValue());
    }
%}
}
#else
%include "stdint.i"
#endif

SWIG_JAVABODY_PROXY(public, public, SWIGTYPE)
SWIG_JAVABODY_TYPEWRAPPER(public, public, public, SWIGTYPE)

%typemap(javaimports) SWIGTYPE
%{
import LibDL.core.*;
%}






%template(StdVectorLong) std::vector<int64_t>;
%template(StdVectorInt) std::vector<int>;
%template(StdVectorString) std::vector<std::string>;
%template(StdVectorDouble) std::vector<double>;
%template(StdVectorFloat) std::vector<float>;
%template(StdVector2DLong) std::vector<std::vector<int64_t>>;
